﻿CREATE TRIGGER [TRG_Project_Insert]
ON [dbo].[Project]
FOR INSERT
AS
BEGIN
	SET NOCOUNT ON

	DECLARE @ProjectId INT

	SELECT @ProjectId = ProjectId
	FROM inserted

	INSERT INTO [dbo].[TransformationSetting]
	(
		[ProjectId]
		,[QueryId]
		,[TransformationBreakdownId]
		,[Value]
	)
	SELECT
		@ProjectId 
		,NULL
		,[TransformationBreakdownId]
		,[DefaultValue]
	FROM [dbo].[TransformationBreakdown]
END
